<?php

namespace Drupal\shusy_store_bind_level\MetadataController;

use EntityDefaultMetadataController;

class ShusyStoreBindLevelMetadataController extends EntityDefaultMetadataController {

  public function entityPropertyInfo() {
    $info = parent::entityPropertyInfo();
    $properties = &$info[$this->type]['properties'];
    $properties['user'] = [
      'label' => t('所有人'),
      'type' => 'user',
      'schema field' => 'uid',
      'description' => t('所有人.'),
    ];
    $properties['op_user'] = [
      'label' => t('操作人'),
      'type' => 'user',
      'schema field' => 'op_uid',
      'description' => t('操作人.'),
    ];

    $properties['created'] = [
      'label' => t('记录时间'),
      'type' => 'date',
      'schema field' => 'created',
      'description' => t('记录时间.'),
    ];
    $properties['changed'] = [
      'label' => t('变化时间'),
      'type' => 'date',
      'schema field' => 'changed',
      'description' => t('变化时间.'),
    ];

    $properties['store'] = [
      'label' => t('店铺'),
      'type' => 'shusy_store',
      'schema field' => 'store_id',
      'description' => t('店铺.'),
    ];
    $properties['level'] = [
      'label' => t('店铺级别'),
      'type' => 'shusy_store_level',
      'schema field' => 'level_id',
      'description' => t('店铺级别.'),
    ];

    return $info;
  }
}
